package com.sxhuayuan.parking.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sxhuayuan.parking.dao.BaseDao;
import com.sxhuayuan.parking.dao.PluginConfigDao;
import com.sxhuayuan.parking.entity.PluginConfig;
import com.sxhuayuan.parking.service.PluginConfigService;

/**
 * Service - 插件配置
 * 
 */
@Service("pluginConfigServiceImpl")
public class PluginConfigServiceImpl extends BaseServiceImpl<PluginConfig, Long> implements PluginConfigService {

	@Resource
	private PluginConfigDao pluginConfigDao;

	@Override
	public BaseDao<PluginConfig, Long> getDAO() {
		return pluginConfigDao;
	}

	@Transactional(readOnly = true)
	public boolean pluginIdExists(String pluginId) {
		return pluginConfigDao.pluginIdExists(pluginId);
	}

	@Transactional(readOnly = true)
	public PluginConfig findByPluginId(String pluginId) {
		return pluginConfigDao.findByPluginId(pluginId);
	}

}